The present invention relates to an echo canceler for removing echo from an input signal in which local background noise is also present.
Echo cancelers are used in videoconferencing terminals, mobile telephone sets, and the like, to prevent the party at the far end from being distracted by hearing an echo of his or her own voice. The echo canceler has an adaptive filter that operates on the signal received from the far end to predict the echo that this signal will produce. The predicted echo is subtracted from the local input signal to remove the echo from the signal sent back to the far end.
To adapt to changes in the local echo path, the tap coefficients of the adaptive filter are adjusted by a mathematical algorithm, such as the well-known normalized least mean squares (NLMS) algorithm, that forces the coefficients to converge to values matching the impulse response of the echo path. The best time to adjust the tap coefficients is when the party at the far end is speaking and the party at the near end is not speaking. Most echo cancelers confine tap-coefficient adjustments to this so-called single-talk state, which can be detected by monitoring the power of the signals involved.
Even when the party at the near end is not speaking, however, local background noise may be present. The residual echo of the far-end speaker""s voice cannot easily be separated from the local background noise, so at moderate or high levels of the local background noise, the tap coefficients cannot be adjusted accurately.
One proposed solution to this problem is the summational NLMS algorithm, which replaces the numerator and denominator values in the NLMS algorithm with sums of these values over an interval of time. The length of the summing interval increases as the power of the outgoing signal decreases. The theory is that over the summing interval, the local background noise will average out to substantially zero, making accurate adjustment of the tap coefficients possible despite the local background noise.
In many situations, however, the local background noise has components that do not average out to zero. Examples of such components include engine noise in an automobile, ventilator noise inside buildings, and crowd noise in the outdoor environments in which portable telephone sets are often used. The summational NLMS algorithm fails to protect the adaptive filter from the effects of this type of local background noise. The summational NLMS algorithm works well only when the local background noise has certain statistical characteristics, such as the characteristics of white noise.
To complicate the problem, the echo canceler may be combined with a noise canceler that removes at least some of the local background noise components from the outgoing signal. This makes the residual echo easier to detect, but the noise canceler""s internal characteristics can affect the adjustment of the echo canceler""s tap coefficients, and in any case, cancellation of the local background noise is rarely complete.
It is accordingly an object of the present invention to improve echo cancellation by reducing the effects of local background noise on the adjustment of tap coefficients in an echo canceler.
A further object is to improve echo cancellation when local background noise is also canceled.
The invented echo cancellation method employs an adaptive filter, and adjusts the tap coefficients of the adaptive filter according to a residual signal left after echo cancellation, using an algorithm in which a step gain determines the sensitivity of the adjustment to the residual signal. According to a first aspect of the invention, the echo cancellation method comprises the steps of:
partitioning the tap coefficients into at least two segments, which are affected to different degrees by local background noise; and
assigning different step gains to the different segments.
A preferred method of partitioning the tap coefficients calculates smoothed absolute values of the tap coefficients, calculates the noise power of the residual signal, and compares the smoothed absolute values of the tap coefficients with the noise power.
An echo canceler according to the first aspect of the invention comprises a partitioner for partitioning the tap coefficients, and a step gain generator for assigning step gains.
An echo cancellation method according to a second aspect of the invention comprises at least the first two, and preferably all four, of the following steps:
classifying the local background noise level;
selecting different step gains according to the class of the local background noise level;
canceling local background noise from the residual signal; and
choosing between the residual signal before noise cancellation and the residual signal after noise cancellation for use in adjustment of the tap coefficients, according to the local background noise level.
These steps can also be incorporated into the first aspect of the invention.
An echo canceler according to the second aspect of the invention comprises a noise level classifier for classifying the local background noise level, and a step gain generator for selecting step gains. The echo canceler may be combined with a noise canceler that cancels noise in the residual signal; in that case, the noise level classifier chooses between the input and output of the noise canceler for use in adjusting the tap coefficients.